package com.base.commons.mybatis.base;

import com.base.commons.tools.page.PageRequest;
import com.base.commons.tools.page.PageResponse;

import java.io.Serializable;
import java.util.List;

public interface IMapperSupport<K extends Serializable, E extends Serializable> {

    Integer deleteByPrimaryKey(K pk);

    Integer insert(E e);

    Integer insertSelective(E e);

    Integer updateByPrimaryKey(E e);

    Integer updateByPrimaryKeySelective(E e);

    E selectByPrimaryKey(K pk);

    List<E> selectAll(E condition);

    List<E> selectList(PageRequest condition);

    Long selectCount(PageRequest condition);

    PageResponse<E> selectPage(PageRequest condition);

}
